from myelin.server.nodetype.Transform import EventsTransform
from nodetypes import config
        
class EventsTransform(EventsTransform):
    
    defaults = config.DEFAULTS
    
    def preHandle(self, context, source, handler):
        context.urlFormatter.defaultParams['mode'] = getattr(
            context.defaults,
            'default_mode'
        ) or self.defaults['mode']
        
# cleanup
del config